var tgd = tgd || {};
tgd.Contests = tgd.Contests || {};
tgd.Contests.SameGame = tgd.Contests.SameGame || {};
tgd.Contests.SameGame.Solver = tgd.Contests.SameGame.Solver || {};
tgd.Contests.SameGame.View = tgd.Contests.SameGame.View || {};

onmessage = function(event) {
	importScripts("Game.js", "Field.js", "Group.js", "Block.js", "Puzzle.js", "View/Field.js", "Solver/RandomSearcher.js", "Solver/Max.js");
	game = new tgd.Contests.SameGame.Game(event.data.ID);
	dummy = new tgd.Contests.SameGame.Solver.RandomSearcher(game, event.data.Max, function(msg) {
		postMessage(msg);
	});
}